package com.jurenzhao.partssystem.accessories.analysis.service;

import com.jurenzhao.partssystem.accessories.analysis.dao.Temp_Piece_InfoMapper;
import com.jurenzhao.partssystem.accessories.analysis.entity.Temp_Piece_Info;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Temp_Piece_InfoService {

    @Resource
    private Temp_Piece_InfoMapper  temp_piece_infoMapper;
    public List<Temp_Piece_Info> findAll(){
        return temp_piece_infoMapper.finAll();
    }

    public boolean delete(Integer pieceId ){
        return temp_piece_infoMapper.deleteByPrimaryKey(pieceId)>0;
    }

    public boolean save(Temp_Piece_Info   temp_piece_info){
        return temp_piece_infoMapper.insert(temp_piece_info)>0;
    }
    public boolean update(Temp_Piece_Info temp_piece_info){
        return temp_piece_infoMapper.updateByPrimaryKeySelective(temp_piece_info)>0;

    }
    public Temp_Piece_Info findById(int pieceNo) {
        return temp_piece_infoMapper.selectByPrimaryKey(pieceNo);
    }


}
